/**
 * Created by Administrator on 15-10-8.
 */
window.onload=function(){
var url=getUrl();
    var userid=getUserId();
    $.jsonp({
        url: 'http://'+url+'/api/sameway/mysameway',
        data: {userId:userid},
        callbackParameter: "callback",
        success: function (data, textStatus, xOptions) {
            var charisma=data.charisma;
            $("#charisma").text(charisma);
            var billing = data.billing;
            $("#billing").text(billing);
            if (charisma<=49&charisma>0){var html='<i class="icons-heart-red"></i>'}
            else if (charisma<=99){var html='<i class="icons-heart-red"></i><i class="icons-heart-red"></i>'}
            else if (charisma<=199){var html='<i class="icons-heart-red"></i><i class="icons-heart-red"></i><i class="icons-heart-red"></i>'}
            else if (charisma<=499){var html='<i class="icons-heart-red"></i><i class="icons-heart-red"></i><i class="icons-heart-red"></i><i class="icons-heart-red"></i>'}
            else{var html='<i class="icons-heart-red"></i><i class="icons-heart-red"></i><i class="icons-heart-red"></i><i class="icons-heart-red"></i><i class="icons-heart-red"></i>'}
            $("#meili").append(html);

        },
        error: function (xOptions,textStatus) {
        }
    })

}
